<div class="content">
<h2><?php print $this->ingredient->name; ?></h2>
<p>Gehe direkt zu <a href="#recipes-list">Cocktailrezepten</a> oder
<a href="#products-list">Produkten</a>.</p>
<h3 class="clear left" style="margin-top: 0; margin-bottom: 0.5em;">Zutateninformationen (Durchschnittswerte)</h3>
<?php if($this->ingredient->getIngredientCategories()) {?>
<div class="attribut">Kategorie:</div>
<div class="wert"><?php
if(is_array($this->ingredient->getIngredientCategories())){
	foreach($this->ingredient->getIngredientCategories() as $category){ ?>
	<a href="<?php print $this->url(array('id'=>$category->getUniqueName(),
		'controller'=>'ingredient-category','module'=>'website'),'rest',true); ?>"><?php print $category->name; ?></a>
<?php } ?></div>
<?php }
} ?>
<?php if($this->ingredient->description) {?>
<div class="attribut">Beschreibung:</div>
<div class="wert"><?php print $this->ingredient->description; ?></div>
<?php } ?>
<?php if($this->ingredient->getAverageAlcoholLevel()) {?>
<div class="attribut">Alkoholgehalt:</div>
<div class="wert"><?php print $this->ingredient->getAverageAlcoholLevel(); ?> %</div>
<?php } ?>
<?php if($this->ingredient->getAverageCaloriesKcal()) {?>
<div class="attribut">Kalorien:</div>
<div class="wert"><?php print round($this->ingredient->getAverageCaloriesKcal()/10); ?> kcal / 100g bzw. 100 ml</div>
<?php } ?>
<?php if($this->ingredient->getAveragePricePerLitre() || $this->ingredient->getAveragePricePerKilogram()) {?>
<div class="attribut">Preis:</div>
<div class="wert"><?php 
if($this->ingredient->getAveragePricePerLitre()) { 
	print number_format($this->ingredient->getAveragePricePerLitre(),2,',','.'); ?> € / Liter <?php
}
if($this->ingredient->getAveragePricePerLitre() && $this->ingredient->getAveragePricePerKilogram()) {
	print '<br />';
}
if($this->ingredient->getAveragePricePerKilogram()) {
	print number_format($this->ingredient->getAveragePricePerKilogram(),2,',','.'); ?> € / kg <?php 
} ?></div>
<?php } ?>
<?php if($this->ingredient->getAverageWeightGram()) {?>
<div class="attribut">Gewicht pro Einheit:</div>
<div class="wert"><?php print $this->ingredient->getAverageWeightGram(); ?> g</div>
<?php }
if($this->recipes) {?>
<h3 class="clear left" style="margin-bottom: 1.7em;" id="recipes-list">Cocktailrezepte mit <?php print $this->ingredient->name; ?></h3>
<div style="clear: left; "><?php
if(is_array($this->recipes)){
	foreach ($this->recipes as $recipe) { ?>
		<?php $this->cocktailPreview($recipe); ?>
	<?php 
	}
} ?></div>
<?php }
$products = Website_Model_Product::productsByIngredientId($this->ingredient->id);
if($products) { ?>
<h3 class="clear left" id="products-list"><?php print $this->ingredient->name; ?> Produkte</h3>
<div style="clear: left; text-align: left;"><?php
if(is_array($products)){ ?>
<ul class="no-bullet" style="margin-left: 0">
<?php 
	foreach ($products as $product) {
		$avgPrice = $product->getAveragePrice();
		$this->productPreview($product);  
	} ?>
</ul>
<?php } ?>
</div>
<?php }  ?>
</div>